/**
 * @param {Egg.Application} app - egg application
 */
module.exports = (app) => {
  const { router, controller } = app;
  router.prefix("/api"); // 设置基础路径
  router.redirect("/api", "/swagger-ui.html", 302);
  router.get("/", controller.home.index);
  // 用户
  require("./router/user")(app);
  // 角色
  require("./router/role")(app);
  // 会员
  require("./router/member")(app);
  // 文件
  require("./router/file")(app);
};
